﻿@model List<SuperiorModel.SpecialPlaceModel>
@{
    ViewBag.Title = "商品专场/专区管理";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<input type="hidden" id="mapRotute" map="map_SpecialPlace" />
<div class="title_ding">

    <p id="location">
        当前位置：
        商品专场/专区管理
    </p>
</div>
<div class="shopmain">
    <div class="shopbody">
        <div class="layui-card">
            @*<div class="layui-card-header">商城管理</div>*@
            <div class="layui-card-body">
                <blockquote class="layui-elem-quote layui-quote-nm">注：专场/专区跳转到指定得分类,此功能用于针对性销售和丰富商城首页模块，具体可参考官方演示商城。</blockquote>
                <div class="layui-form-item">
                    @*<label class="layui-form-label">版本</label>*@
                    <div class="layui-input-block" style="float:left; margin-left:0px;">
                        <button type="button" class="layui-btn" id="btn_addPlace">添加专场/专区</button>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text" id="dataList">
                    <table class="layui-table" lay-filter="test">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>名称</th>
                                <th>图</th>
                                <th>跳转分类</th>
                                <th>状态</th>
                                <th>排序</th>
                                <th>类型</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (var item in Model)
                            {
                            <tr>
                                <td>@item.Id</td>
                                <td>@item.PlaceName</td>
                                <td><img style="width:150px;height:50px;" src="@item.ImgPath" /></td>
                                <td>@item.MenuName</td>
                                <td>
                                    @switch (item.OptionStatus)
                                    {
                                        case 1:
                                            <span style="color:green">启用中</span>
                                            break;
                                        case 0:
                                            <span style="color:orangered">关闭</span>
                                            break;
                                    }
                                </td>
                                <td>@item.Sorft</td>
                                <td>
                                    @switch (item.SpecialType)
                                    {
                                        case 1:
                                            <span style="color:green">专场</span>
                                            break;
                                        case 2:
                                            <span style="color:orangered">专区</span>
                                            break;
                                    }
                                </td>
                                <td>

                                    <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini  DeletePlace" href="javascript:void(0);" OptionId="@item.Id">删除</a>
                                    <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini menuEdit" href="/Product/SpecialPlace?id=@item.Id">编辑</a>
                                </td>
                            </tr>
                            }
                        </tbody>
                    </table>
                </div>


            </div>
        </div>
    </div>
</div>

<script src="~/scripts/Product/SpecialList.js"></script>
<script>
    SpecialListClass.Instance.Init();
</script>


